import { service } from "@/utils/request";

/**
 * 
 * @param {商用-快递管理-快递列表};
 * @param {列表查询}
 * @returns 
 * 
 */
export const getList = (data: object) => {
  return service({
    url: '/comm/express/manage/list',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-快递列表};
 * @param {导出}
 * @returns 
 * 
 */
export const downloadTable = (data: object) => {
  return service({
    url: '/comm/express/export/excel',
    method: 'post',
    data,
    responseType: 'blob'
  })
};

/**
 * 
 * @param {商用-快递管理-快递列表};
 * @param {编辑材料}
 * @returns 
 * 
 */
export const updateMaterial = (data: object) => {
  return service({
    url: '/comm/express/material/update',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-快递列表};
 * @param {删除快递}
 * @returns 
 * 
 */
export const deleteManage = (data: object) => {
  return service({
    url: '/comm/express/manage/delete',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-快递列表};
 * @param {打印标签}
 * @returns 
 * 
 */
export const printMaterialLabel = (data: object) => {
  return service({
    url: '/comm/express/material/print/label',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-新建快递};
 * @param {创建快递}
 * @returns 
 * 
 */
export const insertOrder = (data: object) => {
  return service({
    url: '/comm/express/manage/create',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-新建快递};
 * @param {创建材料}
 * @returns 
 * 
 */
export const insertMaterial = (data: object) => {
  return service({
    url: '/comm/express/material/insert',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-新建快递};
 * @param {删除材料}
 * @returns 
 * 
 */
export const deleteMaterial = (data: object) => {
  return service({
    url: '/comm/express/material/delete',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-新建快递};
 * @param {匹配车架号}
 * @returns 
 * 
 */
export const getContractNum = (data: object) => {
  return service({
    url: '/comm/express/material/get/contract',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-快递详情};
 * @param {根据id查询快递材料列表}
 * @returns 
 * 
 */
export const getMaterialList = (data: object) => {
  return service({
    url: '/comm/express/manage/material/list',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-快递管理-快递详情};
 * @param {根据材料列表id查询材料详情}
 * @returns 
 * 
 */
export const materialInfo = (data: object) => {
  return service({
    url: '/comm/express/material/get',
    method: 'post',
    data
  })
};


